﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Product.ascx.cs" Inherits="Components_Product" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<telerik:RadScriptManager ID="ScriptManager2" runat="server" EnableTheming="True">
</telerik:RadScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
<div class="leftCol">

<div class="four" runat="server" id="div_four">
    <!-- ListView -->
    <asp:ListView ID="lvProductType"  runat="server">
        <LayoutTemplate>
            <table  ID="tbl1" runat="server">
            <tr id="itemPlaceholder" runat="server"></tr>
            <tr id="Tr2" runat="server"></tr>
          </table>
           <%--<div  id="div_ProductTypeName" runat="server"><asp:PlaceHolder ID="itemPlaceholder" runat="server" /></div>--%>
        </LayoutTemplate>
       
        <ItemTemplate>
            <%--<div class="yellowTitleSP"><a href="#"><%#Eval("ProductTypeName")%></a></div>--%>
          <%-- <tr  runat="server">
                <td class="yellowTitleSP" runat="server"><a href="#"><%#Eval("ProductTypeName")%></a></td>
            </tr>--%>
           <tr runat="server">
               <td runat="server">
          <div runat="server" class="productType"><a href="/san-pham/<%#Eval("ProductTypeID")%>/<%# Utils.RemoveUnicode(Eval("ProductTypeName").ToString().Replace(" ", "-").ToLower())%>"><%#Eval("ProductTypeName")%></a></div>
             </td>
            </tr>
       <!-- ListView -->
            <tr id="Tr1" runat="server">
               <td id="Td1" runat="server">
        <asp:ListView ID="lvProduct"  runat="server" DataSource='<%# loadProduct2(Convert.ToInt32(Eval("ProductTypeId"))) %>' ItemPlaceholderID="itemPlaceholder2">
            <%--<LayoutTemplate>
               <div  id="div_listNew" runat="server"></div>  
            </LayoutTemplate>--%>

            <ItemTemplate>
                <div class="greenBg" >
                <div class="info" >
                    <center>
                        <b><%#Eval("ProductName")%></b><br />
                        <a href='<%#Utils.RemoveUnicode(Eval("Link").ToString())%>' runat="server">
                            <img src="<%# Utils.getUrlImage() + Eval("ImagePath")%>" class="pic" alt='<%#Eval("ProductName")%>' />        
                        </a>
                        <br />
                        <b class="price"><%# String.Format("{0:N0}",Eval("Price"))%> vnđ/kg</b>
                        <asp:Button runat="server"  class="greenBtnSmall" ID="btnOrder" Text="Đặt hàng"
                            CommandArgument='<%#Eval("ProductID") + "@" + Eval("ProductName") + "@" +Eval("ProductCode")+"@"+ Eval("ImagePath") +"@"+ Eval("Price")+ "@"+ Eval("IsPromotion") %>'  OnCommand="btnOrder_Command"/>
                    </center>
                </div><!--info----->
                </div>
            </ItemTemplate>
        </asp:ListView>
    
        <!-- End ListView -->  
        </td>
         </tr>
        </ItemTemplate>
       
</asp:ListView>
<!-- End ListView -->
                  
    
<div class="clearBoth"></div>          
</div><!--four--->
 </div>
 </ContentTemplate>
</asp:UpdatePanel>
<div class="progressbar">
    <asp:UpdateProgress ID="up" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
        <ProgressTemplate>
            <div class="bg">
                <div class="progress progress-striped active">
                    <div class="progress-bar" role="progressbar" aria-valuenow="45" aria-valuemin="0"
                        aria-valuemax="100" style="width: 100%">
                        <span class="sr-only">100% Complete</span>
                    </div>
                </div>
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>
</div>